<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<%@ include file="/commons/js/basejs.jsp"%>
<%@ include file="/commons/js/extjs.jsp"%>
<%@ include file="/commons/css/basecss.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>云分销——系统登录</title>
	<link rel="shortcut icon" type="image/x-icon" href="${path}/css/images/icon.png"/>
	<link rel="stylesheet" type="text/css" href="${path}/css/bootstrap.min.css"/>
	<link rel="stylesheet" type="text/css" href="${path}/css/font-awesome.min.css"/>
	<!--[if IE 7]>
		<link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css">
	<![endif]-->
	<link rel="stylesheet" href="${path}/css/yfx_css/login.css" />
</head>
<body>
	<body>
		<div class="fg_loginBody">
			<div class="top_loginBody">
					<div class="left_fgContent">
						 <div class="logopanel">
							<a href="#" class="fengg_logo">
								<img src="/css/images/logo.png"/>
							</a>
		    			</div>
	    				<div class="mb20"></div>
	                    <h5>
	                    	<p class="artcile">云分销是什么？</p>
	                    	<p class="artcile">云分销是下游经销商通过互联网向上游厂商订货的交易管理平台，可以帮助企业实现对经销商的分销订货管理。</p>
	                    </h5>
	                    <div class="mp10"></div>
	                    <ul>
	                        <li>
	                        	<i class="fa fa-arrow-circle-o-right mr5"></i>&nbsp;<span>协助企业对经销商的业务管控问题</span>
	                        </li>
	                        <li>
	                        	<i class="fa fa-arrow-circle-o-right mr5"></i>&nbsp;<span>协助企业的营销规划问题</span>
	                        </li>
	                        <li>
	                        	<i class="fa fa-arrow-circle-o-right mr5"></i>&nbsp;<span>协助企业的生产、库存以及资金计划等问题</span>
	                        </li>
	                        <li>
	                        	<i class="fa fa-arrow-circle-o-right mr5"></i>&nbsp;<span>提升企业的抗风险能力</span>
	                        </li>
	                        <li>
	                        	<i class="fa fa-arrow-circle-o-right mr5"></i>&nbsp;<span>以及更多...</span>
	                        </li>
	                    </ul>
	                <div class="mb20"></div>
				</div>
				<div class="right_fgLogin col-md-5">
		                <div class="user_box">
		                    <h4 class="nomargin user_sigin">用户登录</h4>
		                    <input id="fg_userName" type="text" class="form-control  fg_user_name" required placeholder="请输入用户名" value="aaa"/>
		                    <i class="fa fa-user fg_usersIcon" aria-hidden="true"></i>
		                    <input id="fgPwd" type="password" class="form-control pword fg_pwd" placeholder="请输入密码" value="123456"/>
		                    <i class="fa fa-lock fg_pwdIcon" aria-hidden="true"></i>
		                    <p id="forPwd" class="mp10 forPwd"><a href="">忘记密码?</a></p>
		                    <button id="btn_sigin" onclick="login()" class="btn_login btn-primary mr5" data-toggle="modal" data-target=".bs-example-model">登&nbsp;&nbsp;录</button>
		               </div>           		
				</div>
			</div>
			<div class="footer">
				<div class="pull-left left_cont">
                	&copy;2015杭州蜂国网络科技有限公司 浙icp备1600117号
            	</div>
            	<div class="pull-right right_cont">
                	<span>杭州蜂国科技有限公司版权所有</span>
            	</div>
			</div>
		</div>
		<!-- model -->
		<div class="modal fade bs-example-model example_model"  tabindex="-1" role="dialog"  aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog model_box">
				<div class="modal-content modal-header model_head">
					<div class="modal-body model_body ">
						<div class="pc-win-con tip_box">
							<h5 id='tip_word' class="tip_word"></h5>
        				</div>
					</div>
				</div>
			</div>
		</div>
</body>
<!-- <script type="text/javascript" src="/js/lib/jquery.js"></script> -->
<script src="/js/lib/bootstrap.min.js" type="text/javascript" charset="utf-8"></script>
<!-- <script
  src="http://code.jquery.com/jquery-3.2.1.js"
  integrity="sha256-DZAnKJ/6XZ9si04Hgrsxu/8s717jcIzLy3oi35EouyE="
  crossorigin="anonymous"></script> -->
<script type="text/javascript" language="java">

	function login(){
		$.ajax({
			type : "GET",
			url : "http://localhost:8080/login",
			data : {
				userName : $('#fg_userName').val(),
				password : $('#fgPwd').val()
			},
			withCredentials: true,
			dataType : "json",
			//jsonp:'callback', 
			contentType : 'application/json;charset=utf-8',
			async : false,
			success : function(data) {
				//$.messager.progress("close");
				//swal({title:'',text:data.message,icon:data.icon,timer:1500,buttons:false});
				if(data.success) {
					console.log(data.message);
					window.location.href="${path}/";
				}
			}
		});
	}

	</script>
</html>